Cleanup Tier 2.3-2.7: magic strings/values to constants#104
Merged
Conversation
- 2.3: config.py `parameter == "ph"` → `PH` constant. - 2.4: record_type string compares (`"analytes"`/`"waterlevels"`) → `ANALYTES`/`WATERLEVELS` constants in transformer.py + record.py; added `ANALYTES = "analytes"` to constants.py. - 2.5: api/app.py bucket `"die_cache"` (×3) and queue `"die-queue"` → module constants `_CACHE_BUCKET` / `_TASK_QUEUE`. - 2.7: definitions.py default cron `"0 6 * * *"` and timezone `"America/Denver"` → `_DEFAULT_CRON` / `_SCHEDULE_TIMEZONE` constants. 2.6 (router_parameters from PARAMETER_SOURCE_MAP) deferred: it would force the lean API service to import all of backend.config (every connector + shapely) for a display list, and changes the endpoint's response shape. Documented in docs/cleanup-todo.md. No behavior change. Full suite (311) + dg check defs clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Your pull request is automatically being deployed to Dagster Cloud.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executes the rest of Tier 2 from
docs/cleanup-todo.md. Stacked on #103 (basechore/cleanup-tier1). Merge order: #101 → #102 → #103 → this.config.pyparameter == "ph"→PHconstant."analytes"/"waterlevels") →ANALYTES/WATERLEVELSconstants intransformer.py+record.py; addedANALYTES = "analytes"toconstants.py.api/app.pybucket"die_cache"(×3) + queue"die-queue"→ module constants_CACHE_BUCKET/_TASK_QUEUE.definitions.pydefault cron"0 6 * * *"+ timezone"America/Denver"→_DEFAULT_CRON/_SCHEDULE_TIMEZONE.2.6 deferred (
router_parametersfromPARAMETER_SOURCE_MAP): would force the lean API service to import all ofbackend.config(every connector + shapely) just for a display list, and changes the endpoint's response shape (dtw/tdscodes → param keys). Needs a lightweight parameter registry or frontend coordination. Documented in the TODO.No behavior change. Full suite 311 passed;
dg check defsclean;py_compileover the API file clean.🤖 Generated with Claude Code